package cn.good.yan.apis;

import cn.good.yan.resp.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 演示：openfeign + sentinel进行服务降级和流量监控的整合处理 --------
 * 要启动 9001 、 83 、 nacos、 sentinel服务端
 *
 * @author shengren.yan
 * @create 2024-04-13
 */
@FeignClient(value = "cloud-provider-payment", fallback = SayFeignSentinelApiFallBack.class)
public interface SayFeignSentinelApi {

    // 客户端 - 调用 服务端接口，调用：SayAlibabaController类下的 /say/nacos/{orderNo} 的接口
    @GetMapping(value = "/say/nacos/{orderNo}")
    public ResultData<String> sayNo(@PathVariable("orderNo") String orderNo);

}
